package com.pactera.asmp.server.entity;

import javax.validation.constraints.NotEmpty;

import net.sf.oval.constraint.MatchPattern;

/**
 * @Description User数据传输过程中格式
 * @auther: lzq
 * @date: 2019/7/28 14:05
 */
public class UserDTO {

	private Integer id;
	@NotEmpty(message = "用户名不能为空，请您先填写用户名")
	private String username;
//	@NotNull(message = "手机号不能为空，请您先填写手机号")
	private String mobile;

	private String email;
	@NotEmpty(message = "密码不能为空，请您先填写密码")
//	@MatchPattern(pattern = "^[0-9_a-zA-Z]{6,20}$", message = "用户名或密码有误，请您重新填写")
	private String password;
	@NotEmpty(message = "图片验证码不能为空，请您先填写验证码")
	@MatchPattern(pattern = "\\w{4}$", message = "图片验证码有误，请您重新填写")
	private String code;



	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	@Override public String toString() {
		return "UserDTO{" + "id=" + id + ", username='" + username + '\''
				+ ", mobile='" + mobile + '\'' + ", email='" + email + '\''
				+ ", password='" + password + '\'' + ", code='" + code + '\''
				+ '}';
	}
}